From: Paul Eggert Date: Tue, 8 Jan 2013 05:07:19 +0000 (-0800) Subject: Merge from gnulib (comment change only). X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~3615^2~1124 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ca6a2684bde181c5d15cba08b86304f7f8e222af;p=emacs.git Merge from gnulib (comment change only). --- diff --git a/lib/strftime.c b/lib/strftime.c index 213ced860de..c82d585bfa1 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -208,7 +208,14 @@ extern char *tzname[]; else if (to_uppcase) \ fwrite_uppcase (p, (s), _n); \ else \ - fwrite (s, _n, 1, p); \ + { \ + /* Ignore the value of fwrite. The caller can determine whether \ + an error occured by inspecting ferror (P). All known fwrite \ + implementations set the stream's error indicator when they \ + fail due to ENOMEM etc., even though C11 and POSIX.1-2008 do \ + not require this. */ \ + fwrite (s, _n, 1, p); \ + } \ } \ while (0) \ )